package logic

import (
	"context"
	"fmt"

	"rpc/wfw1/rpc/internal/svc"
	"rpc/wfw1/rpc/returnage"

	"github.com/zeromicro/go-zero/core/logx"
)

type GetageLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewGetageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetageLogic {
	return &GetageLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 定义getage rpc方法
func (l *GetageLogic) Getage(in *returnage.GetageReq) (*returnage.GetageResp, error) {
	// todo: add your logic here and delete this line
	fmt.Println(in.Name)

	return &returnage.GetageResp{
		Age: "18",
	}, nil
}
